package com.psy.counseling.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author 梁学儒
 * @Date 2022/5/31 13:24
 * @Version 1.0
 */

@Data
@Component
@ConfigurationProperties(prefix = "my.security.encode")
public class DataEncodeProperties {
    /**
     * 加密的盐值
     */
    private String salt = "USSR";
    /**
     * base64加密次数
     */
    private int size = 2;
    /**
     * RSA 公钥
     */
    private String publicKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDGquX+eIEpVhWWgMd/rB22AsDnHGC6q9xamfFafvwQXumP03uXPJXodbmGs00JK5KNtkzYTbn7W5LFv4Qcz+C410bor1gew3HXRei41ANciv7e17VTe/sSBOMOXB+PEyQeBN58AUK0OTedKP2R2zQx9AL6BUk5SU5tlH6bHICVswIDAQAB";
    /**
     * RSA 私钥
     */
    private String privateKey = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAMaq5f54gSlWFZaAx3+sHbYCwOccYLqr3FqZ8Vp+/BBe6Y/Te5c8leh1uYazTQkrko22TNhNuftbksW/hBzP4LjXRuivWB7DcddF6LjUA1yK/t7XtVN7+xIE4w5cH48TJB4E3nwBQrQ5N50o/ZHbNDH0AvoFSTlJTm2UfpscgJWzAgMBAAECgYBcrnGpq7ImBKEBm4Z2i2c4+EPiDZ0auP6Nze+I1mDlikHP9UtdHMiasAEjVBaGRquSLQ/ggTJYjzoDwvrxLhGZlqQ4HPBoCy4pvPCdImLQFjNTXVfeQ7+cNjtSWGPMgI4M+NqakX35bS5i6vciEy4cWDnXsL+oGgk5gtjznwTCgQJBAPaAJd/sx1xJya2c0E7YsFSuChKtyrE7O6Q3UUep5t/Zn7Nv2gQqRGa8z00xDmcx2SQ5VDPajqcBC96TZ1w7i5MCQQDOUtqUiP2lgEPCgsj+z9qS9gDKOilbuQWjCkh6aNr9IQRUrzpYZDkAhEgclveNZRqDRcFCoC2Xn7F9OpNSemFhAkBfD8iLdMrlYmdulr0WyyYlYgDsdy1l8AvuJo8n7fPlfA3Eq2wOkyZR4JqpkDOXxHeTKrC4Vp8Q9KxZJ8uCnEwVAkBiFqfOF/ammP0d2zmdUsnyNjwX6GDDN4pDgd8FOxZpYyoA7LGLVlJ3OWxjEy6rrRZWtHH1r9sdC5HBHHjvrDjhAkAu+i9N6N8qyaQCHTWbSZEpcPS2NSZjJ2cIcjcQMr+hnjdAjxJbNyoKDau/9oyF985ifAg4m9Dq20nC/kOs+5Ql";
    /**
     RSA最大加密
     */
    private int keySize = 1024;
    /**
     * RSA 被加密字符串最大长度
     */
    private int maxEncryptBlock = keySize / 8;
    /**
     * RSA 最大解密长度
     */
    private int maxDecryptBlock = keySize / 8;

    /**
     * ip受限个数
     */
    private int ipCount = 250;

}
